Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Export archive #432

Merged
merged 3 commits into from
Jun 23, 2015
Merged

Export archive #432

merged 3 commits into from
Jun 23, 2015

Conversation

danielsdeleo
Copy link
Contributor

Adds a flag to chef export so you can export a tarball instead of just the plain directory structure. This is to support a future chef push-archive command that can be used to transfer policyfiles and the relevant code to an environment with limited networking access.

t = Time.new.utc.strftime("%Y%m%d%H%M%S")
Dir.mktmpdir("chefdk-export-#{p}-#{t}") do |d|
begin
@staging_dir = d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just yield staging_dir?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lemme see how many places I'll have to thread it around.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into it and it made everything a lot uglier. In this case I don't think it's that big a deal since everything that depends on staging_dir is private, so there's no way to call a public method where it would fail because of staging_dir being nil. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough

@jaym
Copy link
Contributor

jaym commented Jun 23, 2015

👍

Adds dependency on `minitar` which is dual licensed as GPL or "same
terms as Ruby"; Ruby is multi-licensed with one option being 2-clause
BSD.
@danielsdeleo danielsdeleo merged commit 0bf9f9c into master Jun 23, 2015
@danielsdeleo danielsdeleo deleted the export-archive branch June 23, 2015 21:06
ksubrama pushed a commit that referenced this pull request Jan 11, 2016
@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants